<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateActivityRefundTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('activity_refund', function(Blueprint $table) {
            $table->increments('id')->comment('自增id');
            $table->integer('user_id')->default(0)->comment('用户id');
            $table->string('order_num')->nullable()->comment('订单编号');
            $table->string('reason')->nullable()->comment('退款原因');
            $table->timestamp('refund_time')->nullable()->comment('退款时间');
            $table->string('failure_reason')->nullable()->comment('失败原因');
            $table->integer('status')->default(0)->comment('状态 0：退款中 1：已退款 2：退款失败');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
